package com.salemanagement.service.impl;

import com.salemanagement.mapper.StoreMapper;
import com.salemanagement.service.StoreService;
import com.salemanagement.vo.IncomeResponse;
import com.salemanagement.vo.QueryParam;
import com.three.core.entity.Store;
import com.three.core.vo.R;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.*;
import java.util.stream.Collectors;

@Service
public class StoreServiceImpl implements StoreService {
    private static final Logger logger = LoggerFactory.getLogger(StoreServiceImpl.class);

    @Autowired
    private StoreMapper storeMapper;


    @Override
    public R selectStore() {
        List<Store> stores = storeMapper.selectList(null);
        if (stores != null && !stores.isEmpty()) {
            return new R<>(200, "查询成功", stores);
        } else {
            return new R<>(500, "查询失败", null);
        }
    }
}
